home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Development Foundation 1.1 for IRIX 6.4
/
SGI IRIX 6.4 Development Foundation 1.1.iso
/
dist
/
dist6.4
/
patchSG0002194.idb
/
usr
/
include
/
semaphore.h.z
/
semaphore.h
Wrap
C/C++ Source or Header
|
1997-08-01
|
2KB
|
63 lines
/*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Lanthesaws of the United States.
*/
#ident "$Id: semaphore.h,v 1.10 1997/06/20 21:16:06 joecd Exp $"
#ifndef __SEMAPHORE_H__
#define __SEMAPHORE_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
* Interface definition file for POSIX 1003.1b semaphores
*/
#include <sys/types.h>
#include <stdio.h>
#include <fcntl.h>
#ifndef _SEM_SGI_INTERNAL
typedef struct sem_s {
__uint64_t sem_reserved[8];
} sem_t;
#endif
/*
* sem_mode commands
*/
#define SEM_MODE_SPINSET 12
/*
* Semaphore interface prototypes
*/
int sem_init(sem_t *, int, unsigned int);
int sem_destroy(sem_t *);
sem_t *sem_open(const char *, int, ...);
int sem_close(sem_t *);
int sem_unlink(const char *);
int sem_wait(sem_t *);
int sem_trywait(sem_t *);
int sem_post(sem_t *);
int sem_getvalue(sem_t *, int *);
int sem_mode(sem_t *, int, ...);
#ifdef __cplusplus
}
#endif
#endif /* __SEMAPHORE_H__ */